package furnitures 
{
	import furnitures.parts.FaceBox;
	/**
	 * ...
	 * @author Dmitriy Gaiduk
	 */
	public class FurnitureFace 
	{
		//public var pictures:Vector.<faceima>;
		public var doors:Vector.<FaceBox>;
		//public var boxes:Vector.<Box>;
		//public var handlers:Vector.<Handle>;
		public var index:int;
		
		public function FurnitureFace(faceIndex:int) 
		{
			index = faceIndex;
		}
		
		public function addDoor(door:FaceBox):void
		{
			if (doors == null)
			{
				doors = new Vector.<FaceBox>();
			}
			doors.push(door);
		}
		
		public function clone():FurnitureFace
		{
			var faceClone:FurnitureFace = new FurnitureFace(index);
			if (doors != null)
			{
				faceClone.doors = new Vector.<FaceBox>;
				for (var i:int = 0; i < doors.length; i++)
				{
					faceClone.addDoor(doors[i].clone());
				}
			}
			return faceClone;
		}
		
	}

}